<!DOCTYPE html>
<html>
    <head>
        <title>解盘</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta
            name="viewport"
            content="viewport-fit=cover,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,target-densitydpi = medium-dpi"
        />
        <meta name="format-detection" content="telephone=no" />
        <meta name="apple-touch-fullscreen" content="YES" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <link href="../c_modules/css/base-min.css" rel="stylesheet" media="all" />
        <link rel="stylesheet" href="../c_modules/swiper/css/swiper.min.css" />
        <link href="../c_modules/jz/mescroll.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="./css/home_newCommon6.css" />

        <!--推荐-->
        <link rel="stylesheet" href="./skin01/home_new_yh01.css" />

        <!--724-->
        <link rel="stylesheet" href="/zx2/skin01/zx_tuijian.css" />
        <link rel="stylesheet" href="/zx2/skin01/zx_kuaixun.css" />

        <link rel="stylesheet" href="./css/home_new_index_reform6.css" />
        <link rel="stylesheet" href="./css/home_new_jp.css" />
    </head>

    <body>
        <div class="tuijian main">
            <!--福牛解盘-->
            <div class="home_new-list">
                <div class="tztui-list-title jr-title pad15 fnjp-title">
                    <div class="btm-line">
                        <span class="title">福牛解盘</span>
                        <span class="more"> <!--更多--><i class="right-arrow"></i> </span>
                    </div>
                </div>
                <div class="fnjp-list">
                    <div>
                        <div class="skeleton skeleton-animated" style="height: 0.26rem; width: 100%"></div>
                        <div class="skeleton skeleton-animated" style="float: right; height: 0.26rem; width: 30%"></div>
                    </div>
                    <div>
                        <div
                            class="skeleton skeleton-animated"
                            style="height: 0.26rem; width: 100%; margin-top: 0.15rem"
                        ></div>
                        <div class="skeleton skeleton-animated" style="float: right; height: 0.26rem; width: 30%"></div>
                    </div>
                    <div>
                        <div
                            class="skeleton skeleton-animated"
                            style="height: 0.26rem; width: 100%; margin-top: 0.15rem"
                        ></div>
                        <div class="skeleton skeleton-animated" style="float: right; height: 0.26rem; width: 30%"></div>
                    </div>
                    <!-- <div class="fnjp-list-item">
                    <div class="content-box">
                        <img src="../zx2/img/zb.png" alt="zb">
                        <div class="title">
                            <p>独家A股五张图：小老弟，该为国接盘的时候，去追独家A股五张图：小老弟，该为国接盘的时候，去追</p>
                        </div>
                    </div>
                    <div class="content-tips">
                        <span class="origin">股市行情</span>
                        <span class="time">15:40</span>
                    </div>
                </div> -->
                </div>
                <!-- <div class="home_new-list-content kx724-box fnjp">
                <div class="swiper-container-fnjp">
                    <div class="swiper-wrapper">
                        <div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">
                            <div class="box-item">
                                <p class="box-title">
                                    <span class="title-left f6f8"></span>
                                    <span class="title-right f6f8"></span>
                                </p>
                                <p class="box-content f6f8"></p>
                            </div>
                        </div>
                        <div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">
                            <div class="box-item">
                                <p class="box-title">
                                    <span class="title-left f6f8"></span>
                                    <span class="title-right f6f8"></span>
                                </p>
                                <p class="box-content f6f8"></p>
                            </div>
                        </div>
                        <div class="swiper-slide" style="width: 1.523rem; margin-right: 0.11rem;">
                            <div class="box-item">
                                <p class="box-title">
                                    <span class="title-left f6f8"></span>
                                    <span class="title-right f6f8"></span>
                                </p>
                                <p class="box-content f6f8"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div> -->
            </div>

            <!-- 投顾观点 -->
            <!--<div class="tougu-group tggd">
            <div class="tougu-list">
                <div class="tougu-head">
                <span class="head-img">
                    <img src="" alt="">
                </span>
                    <span class="head-name">&#45;&#45;</span>
                    <span class="head-desc">&#45;&#45;</span>
                </div>
                <div class="tougu-title">
                    <span class="title-desc">&#45;&#45;</span>
                    <span class="title-icon"></span>
                </div>
                <div class="tougu-content">&#45;&#45;</div>
                <div class="tougu-footer">
                    <span class="footer-read">&#45;&#45;</span>
                    <span class="footer-time">&#45;&#45;</span>
                </div>
            </div>
        </div>-->

            <!-- 资讯要闻 -->
            <div class="yaowen-list"></div>
        </div>
        <script src="../c_modules/jz/mescroll.min.js" charset="utf-8"></script>
        <script src="../c_modules/jquery-1.7.1.min.js"></script>
        <script src="../c/TZT.js"></script>
        <script src="../c_modules/swiper/js/swiper.min.js"></script>
        <script type="text/javascript" src="js/md5.js"></script>
        <script src="js/crypto-js.js"></script>
        <script type="text/javascript" src="js/jsencrypt.js"></script>
        <script src="../common/js/commonFunction.js"></script>
        <script src="../common/js/sticky.min.js"></script>

        <script src="../common/tracking/index.js"></script>
        <script src="../common/tracking/tracking-plugin.js"></script>
        <script src="../common/tracking/tracking-config.js"></script>
        <script src="./js//setHeight.js"></script>
        <script>
            var oVal = {};
            var readId = [];
            var pageSensors = new track.Tracker();
            pageSensors.registerPageModule('SY');
            // 页面浏览 page
            pageSensors.reportPageView('pageView');
            //获取46200配置文件信息
            getConfigInfo(function () {
                getFNJP();
            });
            //福牛解盘
            function getFNJP() {
                var oSendData = {
                    action: '50050' /*46118*/,
                    channel_num: '1', //渠道识别，备注：可以在配置文件里面改，要和华福约定，暂时先用1
                    menu_id: '20149',
                    nPage: 1,
                    maxcount: 5,
                    ReqLinkType: '2',
                };
                $.getData({
                    oSendData: oSendData,
                    copyIsArray: false,
                    isload: false,
                    fnSuccess: function (data1) {
                        var all_arr = {};
                        var date_arr = [];
                        var dataArr = [];
                        //console.log("福牛解盘-复盘-收评复合：",data1);
                        var oSendData = {
                            action: 47100,
                            ReqlinkType: 2,
                            Type: '1,7,8',
                            pageNum: 1,
                            pageSize: 3,
                            bigType: 'ZX',
                        };
                        $.getData({
                            oSendData: oSendData,
                            copyIsArray: false,
                            isload: false,
                            fnSuccess: function (data) {
                                var aGrid = data.GRID0;
                                var ln = aGrid.length;
                                // console.log("早报：",data);
                                if (ln) {
                                    for (var i = 1; i < ln; i++) {
                                        var aData = aGrid[i].split('|');
                                        var _time = aData[data['PUBLISHDATE_INDEX']].split(' ')[0].replace(/-/g, '');
                                        if (all_arr[_time]) {
                                        } else {
                                            all_arr[_time] = {};
                                        }
                                        if (date_arr.indexOf(_time) > -1) {
                                        } else {
                                            date_arr.push(_time);
                                        }
                                        var commonObj = {
                                            id: aData[data['ID_INDEX']],
                                            date: aData[data['PUBLISHDATE_INDEX']].split(' ')[0],
                                            title: aData[data['TITLE_INDEX']],
                                            summary: aData[data['CRTAI_SUMMARY_INDEX']],
                                            time: aData[data['PUBLISHDATE_INDEX']].split(' ')[1],
                                            isjump: aData[data['ISJUMP_INDEX']],
                                            jumplink: aData[data['JUMPLINK_INDEX']],
                                        };
                                        if (aData[data['TYPE_INDEX']] == '小福早报') {
                                            all_arr[_time].zbObj = commonObj;
                                            dataArr.push(commonObj);
                                        }
                                        if (aData[data['TYPE_INDEX']] == '小福午评') {
                                            all_arr[_time].wpObj = commonObj;
                                            dataArr.push(commonObj);
                                        }
                                        if (aData[data['TYPE_INDEX']] == '小福晚报') {
                                            all_arr[_time].wbObj = commonObj;
                                            dataArr.push(commonObj);
                                        }
                                        all_arr[_time].disable = true;
                                        all_arr[_time].date = aData[data['PUBLISHDATE_INDEX']].split(' ')[0];
                                    }
                                    var aGrid1 = data1.GRID0;
                                    var _infocode = data1.INFOCODE, //板块资讯
                                        _title = data1.TITLE, //标题
                                        _summary = data1.SUMMARY, //摘要
                                        _date = data1.DATE, //日期
                                        _time = data1.TIME; //时间
                                    for (var i = 0; i < aGrid1.length; i++) {
                                        var aData1 = aGrid1[i].split('|');
                                        var _date1 = aData1[_date].replace(/-/g, '');
                                        if (date_arr.indexOf(_date1) > -1) {
                                        } else {
                                            date_arr.push(_date1);
                                        }
                                        if (all_arr[_date1]) {
                                        } else {
                                            all_arr[_date1] = {};
                                        }
                                        if (aData1[data1.TYPE] == 1) {
                                            //收评
                                            all_arr[_date1].spObj = {
                                                id: aData1[_infocode],
                                                date: aData1[_date],
                                                title: aData1[_title],
                                                summary: aData1[_summary],
                                                time: aData1[_time],
                                            };
                                            all_arr[_date1].disable = true;
                                            all_arr[_date1].date = aData1[_date];
                                        } else if (aData1[data1.TYPE] == 0) {
                                            //复盘
                                            all_arr[_date1].fpObj = {
                                                id: aData1[_infocode],
                                                date: aData1[_date],
                                                title: aData1[_title],
                                                summary: aData1[_summary],
                                                time: aData1[_time],
                                            };
                                            all_arr[_date1].disable = true;
                                            all_arr[_date1].date = aData1[_date];
                                        }
                                    }
                                    date_arr = date_arr.sort(function (a, b) {
                                        return b - a;
                                    });
                                    loadDom(all_arr, date_arr);
                                    // console.log("处理过后的数据：",all_arr,date_arr)
                                } else {
                                    $('.fnjp-list').hide();
                                }
                                getYaoWenInfo();
                            },
                            oConfig: function oConfig(data) {
                                console.log('早报报错信息', data);
                                $('.fnjp-list').hide();
                                getYaoWenInfo();
                            },
                        });
                    },
                    oConfig: function oConfig(data) {
                        console.log('复盘-收评复合报错信息', data);
                        $('.fnjp-list').hide();
                        getYaoWenInfo();
                    },
                });
            }

            function loadDom(dataObj, dateArr) {
                //整合数据，日期排序数组
                var dataLength = 0;
                var listArr = [];
                for (var i = 0; i < dateArr.length; i++) {
                    for (var item in dataObj) {
                        if (item == dateArr[i]) {
                            if (isToday(dataObj[item].date)) {
                                dataLength = getDataLength(dataObj[item]);
                            }
                            //处理日期---判断是早报、收评、复盘
                            if (dataObj[item].wbObj) {
                                //存在晚报
                                dataObj[item].wbObj.type = '晚报';
                                dataObj[item].wbObj.dateTime =
                                    dataObj[item].wbObj.date.replace(/-/g, '') +
                                    String(dataObj[item].wbObj.time.replace(/:/g, ''));
                                listArr.push(dataObj[item].wbObj);
                            }
                            if (dataObj[item].fpObj) {
                                //存在复盘
                                dataObj[item].fpObj.type = '复盘';
                                dataObj[item].fpObj.dateTime =
                                    dataObj[item].fpObj.date.replace(/-/g, '') +
                                    String(dataObj[item].fpObj.time.replace(/:/g, ''));
                                listArr.push(dataObj[item].fpObj);
                            }
                            if (dataObj[item].spObj) {
                                //存在收评
                                dataObj[item].spObj.type = '收评';
                                dataObj[item].spObj.dateTime =
                                    dataObj[item].spObj.date.replace(/-/g, '') +
                                    String(dataObj[item].spObj.time.replace(/:/g, ''));
                                listArr.push(dataObj[item].spObj);
                            }
                            if (dataObj[item].wpObj) {
                                //存在午评
                                dataObj[item].wpObj.type = '午评';
                                dataObj[item].wpObj.dateTime =
                                    dataObj[item].wpObj.date.replace(/-/g, '') +
                                    String(dataObj[item].wpObj.time.replace(/:/g, ''));
                                listArr.push(dataObj[item].wpObj);
                            }
                            if (dataObj[item].zbObj) {
                                //存在早报
                                dataObj[item].zbObj.type = '早报';
                                dataObj[item].zbObj.dateTime =
                                    dataObj[item].zbObj.date.replace(/-/g, '') +
                                    String(dataObj[item].zbObj.time.replace(/:/g, ''));
                                listArr.push(dataObj[item].zbObj);
                            }
                        }
                    }
                }
                listArr.sort(compare('dateTime')).reverse();
                renderList(listArr, dataLength);
            }

            function renderList(listArr, todayDataLength) {
                var sHtml = '';
                if (todayDataLength >= 3) {
                    for (var i = 0; i < listArr.length; i++) {
                        if (isToday(listArr[i].date)) {
                            var time = listArr[i].time.substr(0, 5);
                            sHtml +=
                                '<div class="fnjp-list-item" data-date="'+listArr[i].date+'" data-isjump="' +
                                listArr[i].isjump +
                                '" data-jumplink="' +
                                listArr[i].jumplink +
                                '" data-id="' +
                                listArr[i].id +
                                '" data-fl="' +
                                getDataType(listArr[i].type).nameEn +
                                '" data-name="' +
                                listArr[i].type +
                                '">' +
                                '<div class="content-box">' +
                                '<img src="' +
                                getDataType(listArr[i].type).imgSrc +
                                '" alt="">' +
                                '<div class="title">' +
                                '<p>' +
                                listArr[i].title +
                                '</p>' +
                                '</div>' +
                                '</div>' +
                                '<div class="content-tips">' +
                                '<span class="origin"></span>' +
                                '<span class="time">' +
                                time +
                                '</span>' +
                                '</div>' +
                                '</div>';
                        }
                    }
                } else {
                    for (var i = 0; i < 3; i++) {
                        if (isToday(listArr[i].date)) {
                            var date = listArr[i].time.substr(0, 5);
                        } else {
                            var dateSplit = listArr[i].date.split('-');
                            var date = dateSplit[1] + '-' + dateSplit[2];
                        }
                        sHtml +=
                            '<div class="fnjp-list-item" data-date="'+listArr[i].date+'" data-isjump="' +
                            listArr[i].isjump +
                            '" data-jumplink="' +
                            listArr[i].jumplink +
                            '" data-id="' +
                            listArr[i].id +
                            '" data-fl="' +
                            getDataType(listArr[i].type).nameEn +
                            '" data-name="' +
                            listArr[i].type +
                            '">' +
                            '<div class="content-box">' +
                            '<img src="' +
                            getDataType(listArr[i].type).imgSrc +
                            '" alt="">' +
                            '<div class="title">' +
                            '<p>' +
                            listArr[i].title +
                            '</p>' +
                            '</div>' +
                            '</div>' +
                            '<div class="content-tips">' +
                            '<span class="origin"></span>' +
                            '<span class="time">' +
                            date +
                            '</span>' +
                            '</div>' +
                            '</div>';
                    }
                }
                $('.fnjp-list').html(sHtml);
                FNJPEvent();
                getYaoWenInfo();
                
            }

            function compare(prop) {
                return function (obj1, obj2) {
                    var val1 = obj1[prop];
                    var val2 = obj2[prop];
                    if (!isNaN(Number(val1)) && !isNaN(Number(val2))) {
                        val1 = Number(val1);
                        val2 = Number(val2);
                    }
                    if (val1 < val2) {
                        return -1;
                    } else if (val1 > val2) {
                        return 1;
                    } else {
                        return 0;
                    }
                };
            }

            function getDataType(type) {
                if (type == '早报') {
                    return {
                        imgSrc: '../zx2/img/zb.png',
                        nameEn: 'zb',
                    };
                }
                if (type == '午评') {
                    return {
                        imgSrc: '../zx2/img/wp.png',
                        nameEn: 'wp',
                    };
                }
                if (type == '晚报') {
                    return {
                        imgSrc: '../zx2/img/wb.png',
                        nameEn: 'wb',
                    };
                }
                if (type == '收评') {
                    return {
                        imgSrc: '../zx2/img/sp.png',
                        nameEn: 'sp',
                    };
                }
                if (type == '复盘') {
                    return {
                        imgSrc: '../zx2/img/fp.png',
                        nameEn: 'fp',
                    };
                }
            }

            function getDataLength(data) {
                var length = 0;
                if (data.zbObj) {
                    length += 1;
                }
                if (data.wpObj) {
                    length += 1;
                }
                if (data.wbObj) {
                    length += 1;
                }
                if (data.spObj) {
                    length += 1;
                }
                if (data.fpObj) {
                    length += 1;
                }
                return length;
            }

            function FNJPEvent() {
                //跳转福牛解盘
                $('.fnjp-list .fnjp-list-item')
                    .off()
                    .on('click', function () {
                        var title = $(this).attr('data-name');
                        //小福复盘，小福收评，小福早报事件埋点
                        track.sensors.track('second_list_click', {
                            bottomtabbar_name: '探索',
                            toptabbar_name: '首页',
                            first_list_name: '资讯',
                            second_list_type: '详情',
                            second_list_name: title,
                        });

                        // 首页栏位点击-福牛解盘-栏目
                        pageSensors.reportClick('mainPageColumnClick', {
                            column_type: '福牛解盘',
                            column_name: title,
                            column_no: $(this).parent().index(),
                        });

                        var sId = $(this).attr('data-id');
                        var obj = '';
                        if (
                            $(this).attr('data-fl') == 'zb' ||
                            $(this).attr('data-fl') == 'wb' ||
                            $(this).attr('data-fl') == 'wp'
                        ) {
                            if ($(this).attr('data-isjump') == 1) {
                                obj = {
                                    url: $(this).attr('data-jumplink').trim(),
                                };
                            } else {
                                obj = {
                                    url: '/zx2/zx_zxxq.html?id=' + sId + '&&type=huafu',
                                };
                            }
                        } else if ($(this).attr('data-fl') == 'sp') {
                            //return;
                            var _date = $(this).attr('data-date');
                            obj = {
                                url: '/zx2/zx_zxxq.html?id=' + sId + '&&menu_id=002' + '&&type=hejzx&&date=' + _date,
                            };
                        } else {
                            obj = {
                                url: '/zx2/zx_zxxq.html?id=' + sId + '&&menu_id=002' + '&&type=hejzx',
                            };
                        }
                        var oSend = { url: obj.url };
                        if ($(this).attr('data-fl') == 'zb') {
                            oSend.secondtext = '早报';
                        } else {
                            oSend.secondtype = '98';
                            oSend.secondtext = 'tzt_zx.png';
                            oSend.secondjsfuncname = 'tztPageSecodeFun()';
                        }

                        T.fn.action10061(oSend);
                    });
                $('.fnjp-title .more')
                    .off()
                    .on('click', function () {
                        if (oVal.configData.THS_MZ_KEY || oVal.configData.THS_MZ_KEY == '0') {
                            //旧版资讯推荐
                            var oSend = { url: '/zx2/zx_lmt.html?type=hf' };
                            oSend.config = {
                tzthiddentitle: '1',
                tztadjustnever: '1'
            };
                            T.fn.action10061(oSend);
                        } else {
                            T.fn.changeurl(
                                'http://action:58114/?TitleSkinType=1&&firsttext=资讯&&secondtext=数据&&rightfunctionname=rightfunc&&firsturl=/zx2/zx_list.html?type=fnjp&&secondurl=https://b2b-api.10jqka.com.cn/b2bgw/resource/h5/private/HFZQ/latest/home_newpage/home_newpage/index.html#/?ckey=608028110045'
                            );
                        }
                    });
            }
            function isToday(str) {
                return new Date().toDateString() === new Date(str.replace(/-/g, '/')).toDateString(); //ios中时间转换new Date()不兼容横杆'-'问题，转为斜杠‘/’
            }
            Date.prototype.format = function (fmt) {
                var o = {
                    'M+': this.getMonth() + 1, //月份
                    'd+': this.getDate(), //日
                    'h+': this.getHours(), //小时
                    'm+': this.getMinutes(), //分
                    's+': this.getSeconds(), //秒
                    'q+': Math.floor((this.getMonth() + 3) / 3), //季度
                    S: this.getMilliseconds(), //毫秒
                };
                if (/(y+)/.test(fmt)) {
                    fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
                }
                for (var k in o) {
                    if (new RegExp('(' + k + ')').test(fmt)) {
                        fmt = fmt.replace(
                            RegExp.$1,
                            RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
                        );
                    }
                }
                return fmt;
            };
            function dateStrTG(date) {
                //console.log(date)
                var nowDate = new Date();
                var time = nowDate.getTime();
                var nowyear = nowDate.getFullYear();
                var year = date.substr(0, 4);
                var month = Number(date.substr(5, 2));
                var day = Number(date.substr(8, 2));
                var hour = Number(date.substr(11, 2));
                var minute = Number(date.substr(14, 2));
                var second = Number(date.substr(17, 2));
                var newDate = new Date(year, month - 1, day, hour, minute, second).getTime();
                time = parseInt((time - newDate) / 1000);
                var s;
                if (time < 60 * 5) {
                    //五分钟内
                    return '刚刚';
                } else if (time < 60 * 60 && time >= 60 * 5) {
                    //超过十分钟少于1小时
                    s = Math.floor(time / 60);
                    return s + '分钟前';
                } else if (time < 60 * 60 * 24 && time >= 60 * 60) {
                    //超过1小时少于24小时
                    s = Math.floor(time / 60 / 60);
                    return s + '小时前';
                } else if (time < 60 * 60 * 24 * 3 && time >= 60 * 60 * 24) {
                    //超过1天少于3天内
                    s = Math.floor(time / 60 / 60 / 24);
                    return s + '天前';
                } else {
                    //超过3天
                    return date;
                }
            }

            /*要闻-资讯*/
            oVal.jiepanPageNum = 1;
            oVal.loadJPFlag = true;
            oVal.infoOffset = '0'; //取接口返回的字段
            
            function getYaoWenInfo() {
                var oSendData = {
                    action: '31020',
                    param: JSON.stringify({
                        accessKey: 'e6ce431bd537718a',
                        infoOffset: oVal.infoOffset, //当前已遍历查询的资讯页数，默认为 0
                        page: oVal.jiepanPageNum - 1,
                    }),
                    ReqLinkType: '2',
                };
                $.getData({
                    oSendData: oSendData,
                    copyIsArray: false,
                    isload: false,
                    fnSuccess: function (data) {
                        // console.log("解盘-要闻",data,JSON.parse(data.BINDATA));
                        var sHtml = '';
                        if (data.BINDATA) {
                            var _result = JSON.parse(data.BINDATA).data;
                            oVal.infoOffset = JSON.parse(data.BINDATA).infoOffset;
                            if (_result.length > 0) {
                                oVal.ywNextPage = JSON.parse(data.BINDATA).hasNext;
                                for (var i = 0; i < _result.length; i++) {
                                    var obj = {};
                                    obj.id = _result[i].itemId; //id
                                    obj.ctime = _result[i].time; //时间，日期
                                    obj.imgUrl = _result[i].imgUrl; //图片
                                    obj.source = _result[i].source; //来源
                                    obj.title = _result[i].title; //标题
                                    obj.copyright = _result[i].copyright; //有无版权
                                    obj.url = _result[i].url; //无版权时的三方地址

                                    if (obj.copyright && obj.copyright == '1') {
                                        sHtml += loadDOM_TT(obj);
                                    }
                                }
                            } else {
                            }
                        }
                        if (oVal.jiepanPageNum == '1') {
                            $('.yaowen-list').html(sHtml);
                        } else {
                            $('.yaowen-list').append(sHtml);
                        }
                        pageUrl();
                        setHeight();
                        oVal.loadJPFlag = true;
                    },
                    oConfig: function () {},
                });
            }
            function loadDOM_TT(data) {
                var readClass = '';
                var newDate = dateStr(formatDate(data.ctime));
                //var newDate = formatDateHM(data.ctime);
                var sHtml =
                    '<li class="zx-list" data-copyright="' +
                    data.copyright +
                    '" data-url="' +
                    data.url +
                    '" data-id="' +
                    data.id +
                    '"  data-time="' +
                    formatDate(data.ctime) +
                    '"  data-title="' +
                    data.title +
                    '"  data-source="' +
                    data.source +
                    '">' +
                    '<p class="zx-name ' +
                    readClass +
                    '">' +
                    data.title +
                    '</p><p class="zx-foot">' +
                    '<span class="zx-date">' +
                    newDate +
                    '</span>' +
                    '<span class="zx-media" style="float: right;padding-right: 0.1rem;">' +
                    data.source +
                    '</span></p>' +
                    '</li>';
                return sHtml;
            }
            function formatDate(timestamp) {
                var date = new Date(timestamp * 1000); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
                var Y = date.getFullYear(),
                    M = date.getMonth() + 1 < 10 ? date.getMonth() + 1 : date.getMonth() + 1,
                    D = date.getDate(),
                    h = date.getHours(),
                    m = date.getMinutes(),
                    s = date.getSeconds();
                M = M < 10 ? '0' + M : M;
                D = D < 10 ? '0' + D : D;
                h = h < 10 ? '0' + h : h;
                m = m < 10 ? '0' + m : m;
                s = s < 10 ? '0' + s : s;
                return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
            }
            function pageUrl() {
                var action = 'read.txt';
                $('.zx-list')
                    .off()
                    .on('click', function () {
                        var sId = $(this).attr('data-id'),
                            time = $(this).attr('data-time'),
                            source = $(this).attr('data-source'),
                            jumpurl = $(this).attr('data-url'),
                            copyright = $(this).attr('data-copyright'),
                            title = $(this).attr('data-title');
                        var obj = {
                            url:
                                '/zx2/zx_zxxq.html?type=ths&id=' +
                                sId +
                                '&time=' +
                                encodeURIComponent(time) +
                                '&source=' +
                                encodeURIComponent(source),
                        };
                        var oSend = { url: obj.url };

                        pageSensors.reportClick('mainPageColumnClick', {
                            column_type: '福牛解盘',
                            column_name: title,
                            column_no: $(this).index(),
                        });

                        // $(this).find(".zx-name").addClass('zx-read-name');
                        if (readId.toString().indexOf(sId) == -1) {
                            readId.push(sId);
                        }
                        T.saveMapMesg({ THSPAGETITLE: title }, function () {});
                        T.saveFileMesg(readId, action, function (oData) {
                            T.readFileMesg(action, function (oData) {
                                if (copyright == '1') {
                                    TZT.fn.action10061(oSend);
                                } else {
                                    TZT.fn.action10061({ url: jumpurl });
                                }
                            });
                        });
                    });
            }

            function dateStr(date) {
                //console.log(date)
                var nowDate = new Date();
                var time = nowDate.getTime();
                var nowyear = nowDate.getFullYear();
                var year = date.substr(0, 4);
                var month = Number(date.substr(5, 2));
                var day = Number(date.substr(8, 2));
                var hour = Number(date.substr(11, 2));
                var minute = Number(date.substr(14, 2));
                var second = Number(date.substr(17, 2));
                var newDate = new Date(year, month - 1, day, hour, minute, second).getTime();
                time = parseInt((time - newDate) / 1000);
                var s;
                if (time < 60 * 5) {
                    //五分钟内
                    return '刚刚';
                } else if (time < 60 * 60 && time >= 60 * 5) {
                    //超过十分钟少于1小时
                    s = Math.floor(time / 60);
                    return s + '分钟前';
                } else if (time < 60 * 60 * 24 && time >= 60 * 60) {
                    //超过1小时少于24小时
                    s = Math.floor(time / 60 / 60);
                    return s + '小时前';
                } else if (time < 60 * 60 * 24 * 3 && time >= 60 * 60 * 24) {
                    //超过1天少于3天内
                    s = Math.floor(time / 60 / 60 / 24);
                    return s + '天前';
                } else {
                    //超过3天
                    if (year == nowyear) {
                        return date.substr(5, 5);
                    } else {
                        return date.split(' ')[0];
                    }
                }
            }

            /**
             * 获取配置文件信息
             * */
            function getConfigInfo(callback) {
                $.getData({
                    oSendData: {
                        action: '46200',
                        ReqlinkType: 2,
                    },
                    isload: false,
                    fnSuccess: function (oData) {
                        oVal.configData = oData;
                        callback();
                    },
                    oConfig: function (error) {
                        console.log(error);
                        callback();
                    },
                });
            }

            window.loadMoreData = function () {
                if(!!oVal.loadJPFlag && !!oVal.ywNextPage){
                    // console.log("加载数据");
                    oVal.loadJPFlag = false;
                    oVal.jiepanPageNum++;
                    getYaoWenInfo()
                }
            };
        </script>
    </body>
</html>
